﻿@model PhoneBilling.Models.AccountModel
@{
    ViewBag.Title = "结账";
    Layout = "~/Views/Shared/_Layout.cshtml"; 
}
<script type="text/javascript">
    function begin() {
        $(".input-submit").attr("disabled", false);
    }
    //    function confirm() {
    //        $("#confirmText").text("结账中,请稍等......");
    //        $("form").submit();
    //        $(".input-submit").attr("disabled", true);
    //    }
    function complete() {
        $("#confirmText").text("结账完成！");
        $(".input-submit").attr("disabled", false);
    }
</script>
<script type="text/javascript">
    $(document).ready(function () {
        $(".input-submit").ligerButton(
        {
            click: function () {
                $("#confirmText").text("结账中,请稍等......");
                $("form").submit();
                $(".input-submit").attr("disabled", true);
            }
        });
    });
    
</script>
@using (Ajax.BeginForm(new AjaxOptions() { InsertionMode = InsertionMode.Replace, OnBegin = "begin()", OnComplete = "complete()", UpdateTargetId = "phoneList", HttpMethod = "post" }))
{
    <div class="system_contain_group account">
        <h3 class="title">
            请选择结账月份</h3>
        <div class="system_input_contain">
            @Html.LabelFor(m => m.年)
            @Html.DropDownListFor(m => m.年, new SelectList(Model.年List), new { style = "input-text" })
            @Html.ValidationMessageFor(m => m.年, new { style = "color:Red" })
            @Html.LabelFor(m => m.月)
            @Html.DropDownListFor(m => m.月, new SelectList(Model.月List), new { style = "input-text" })
            @Html.ValidationMessageFor(m => m.月, new { style = "color:Red" })
        </div>
        <div class="system_input_contain">
            <input type="submit" value="确定" class="input-submit" />
            <label id="confirmText">
            </label>
        </div>
    </div>
}
<div id="phoneList">
</div>
